{% extends "recursosHumanos/index.html" %}
{% load i18n %}
{% block title %}{% trans 'Página Inícial Recursos Humanos' %}{% endblock %}
{% block breadcrumb %}
<ul class="breadcrumb">
	<li>
		<span class="glyphicon glyphicon-home"></span> <a tabindex="2" href="{% url homeRecursosHumanos %}" title="{% trans 'Home' %}">{% trans 'Home' %}</a>
	</li>
	<li class="active">{% trans 'Lista de Docentes a Editar' %}</li>
</ul>
{% endblock %}

<!-- Estes blocos é para alterar a classe do menu do index, refere se está ou não activo -->
{% block MenuDocente %}active{% endblock %}
{% block MenuInformacao %} {% endblock %}


{% block filtros %}

    <div class="list-group">
  <a href="#" class="list-group-item active">
    Departamento
  </a>
  {% include "recursosHumanos/elements/filter_dep.html" %}
  
  <a href="#" class="list-group-item active">Categoria</a>
  {% include "recursosHumanos/elements/filter_cat.html" %}

</div>
      

<!--<ul>

	<li class='title'>
		<span>Filtros</span>
	</li>
	<li class="has-sub" >
		<a  id="oa_button" tabindex="4" href='#oa'><span>Por Ordem Alfabética</span></a>

	</li>
	<div id="oa">

	

	</div>

	<li class="has-sub">
		<a id="da_button" tabindex="4" href='#dep'><span>Por Departamento</span></a>
		
	</li>
	<div id="dep">


	</div>
	<li class="has-sub">
		<a id="ca_button" tabindex="4" href='#category'><span>Por Categoria</span></a>
		
	</li>
	<div id="category">

	

	</div>
</ul>-->

{% endblock %}

{% block content %}

<div class="page-header whiteText">
  <h1>{% trans 'Lista de Docentes ' %}<small>{% trans 'Editar' %}</small></h1>
</div>
{%comment%}
<nav role="navigation" class="navbar navbar-default">
	<div  class="collapse navbar-collapse">
       	<div  class="collapse navbar-collapse navbar-left" >
       		{% if keyword != None%}	
          		<p class="navbar-text">Pesquisa por "{{keyword}}</p>
          	{% endif %}
          	<p class="navbar-text">{{sizeList}} resultados encontrados</p>
        </div>
        {% csrf_token %}
        <form role="search" class="navbar-form navbar-left" action="" method="get" name="searchForm">
        	<div class="form-group">
           		<input name="searchField" type="text" placeholder="{%trans 'Search'%}" class="form-control" value="{{keyword}}">
            </div>
            <button class="btn btn-default" name="Submit" type="submit">{%trans 'Search'%}</button>
       	</form>
	</div>
</nav>
{%endcomment%}
<!--<table class="table table-striped">
	<tr>
		<th>{% trans 'Lista de Docentes a Editar' %}</th>
	</tr>
	<tr>
		<th colspan="6" class="top_sumario" > {% csrf_token %}
		<form action="" method="get" name="searchForm">
			<img src="/static/images/selector-search.gif" title="search" alt="searchIcon" />
			<input name="searchField" id="searchField" type="search" value="{{keyword}}" />
			<input id="submitSearch" value={%trans 'Search'%} name="Submit" type="submit" />
			
					<span>- {{sizeList}} resultados encontrados</span>
		</form></th>
	</tr>
</table>-->

<table cellpadding="0" cellspacing="0" border="0" class="display sumary_table" id="special_table" width="100%">
<thead>	
	<tr>
		<th class="cabecalho_sumario">Docente</th>
		<th class="cabecalho_sumario">Departamento</th>
		<th class="cabecalho_sumario">Categoria</th>
		<th class="cabecalho_sumario">Regime Exclusividade</th>
		<th class="cabecalho_sumario">Termo Contrato</th>
	</tr>
</thead>
<tbody>
	{% for nome, departamento, id_Docente, nomeCategoria, exclusividade, fim_contrato in listaDocentes %}
	<tr>
		<td class="teacher_name_field"><a href="{{id_Docente}}">{{nome}}</a></td>
		<td>{{departamento}}</td>
		<td>{{nomeCategoria}}</td>
		<td>{{exclusividade}}</td>
		<td>{{fim_contrato}}</td>
	</tr>
	{% endfor %}
</tbody>
<tfoot>
	<tr>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
</tfoot>
	{%if sizeList == 0 %}
			
			<tr>
				<td colspan="6">Não existem resultados para esta pesquisa</td>
			</tr>
			
		{% endif %}

</table>

{%comment%}
<!--PAGINAÇÂO -->
<div>
		<span class="current"> Página {{ docentes.number }} de {{ docentes.paginator.num_pages }}. </span>
		<span class="step-links"><a href="?show=all">Todos</a></span>
	<ul class="pagination">	
		<li><a href="?show=all">Todos</a></li>
		{% for page_num in drange %}
			{%if page_num == docentes.number%}
				<li id = "{{ page_num}}" class="active"><a href="?page={{ page_num}}&{{actualState}}">{{ page_num}}</a></li>
			{%else%}
				 <li id = "{{ page_num}}"><a href="?page={{ page_num}}&{{actualState}}">{{ page_num}}</a></li>
			{%endif%}
		{% endfor%} 
	</span>	
</div>
{%endcomment%}


<script src="/static/javaScript/jquery-2.0.3.js"></script>
<script src="/static/dataTables/js/jquery.dataTables.js"></script>
<script type="text/javascript">



$(document).ready(function() {
	$('#special_table').dataTable({
		"oLanguage": {
            "sUrl": "/static/dataTables/lang/pt-pt.txt"
        },
         "sPaginationType": "full_numbers",
         "sDom": '<"dataTables_special_bar"l><"dataTables_special_bar"if><"whiteBox"rt><"pagination_box"p>'
        
        	
	});
} );
</script>
{% endblock %}

